package o;

import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import androidx.annotation.Nullable;
import com.huawei.appgallery.agwebview.api.ui.IWebViewActivityProtocol;
import com.huawei.appgallery.assistantdock.buoydock.webview.request.BuoyWebViewWindowRequest;

public class bho extends fai {
    private azq ˊ = null;
    private Context ˏ;
    private String ॱ = null;

    public bho(Context context) {
        this.ˏ = context;
    }

    public void ˋ(@Nullable Bundle bundle) {
        super.ˋ(bundle);
        if (bundle == null) {
            ॱ(this.ˏ);
            return;
        }
        this.ॱ = bundle.getString("url");
        String string = bundle.getString("title");
        IWebViewActivityProtocol buoyWebViewWindowRequest = new BuoyWebViewWindowRequest();
        buoyWebViewWindowRequest.setUri("big_buoy_webview");
        buoyWebViewWindowRequest.setUrl(this.ॱ);
        buoyWebViewWindowRequest.setTitle(string);
        buoyWebViewWindowRequest.setEnableProxy(bundle.getBoolean("enable_proxy", true));
        this.ˊ = ((azi) fho.ˏ().ˋ("AGWebView").ॱ(azi.class)).ˋ(buoyWebViewWindowRequest.getUri());
        if (this.ˊ == null || !this.ˊ.ˊ(this.ˏ, buoyWebViewWindowRequest)) {
            ॱ(this.ˏ);
        } else {
            this.ˊ.ॱ(this.ˏ, buoyWebViewWindowRequest);
        }
    }

    public View ˏ() {
        if (this.ˏ == null) {
            Logger.e("WebviewWindow", "onCreateView, context == null");
            return null;
        }
        View inflate = LayoutInflater.from(this.ˏ).inflate(this.ˊ.ʻ(), null);
        this.ˊ.ˎ(inflate);
        this.ˊ.ˏ(this.ˏ, null);
        return inflate;
    }

    public void B_() {
        super.B_();
        if (this.ॱ != null) {
            fam.ॱ().ˊ(this.ˏ, this);
            this.ˊ.ʽ(this.ॱ);
            this.ॱ = null;
        }
        this.ˊ.ॱˋ();
    }

    public void C_() {
        super.C_();
    }

    public void D_() {
        if (this.ˊ != null) {
            this.ˊ.ʽ();
        }
        super.D_();
    }

    public View ˊ(int i) {
        if (ˊॱ() == null) {
            return null;
        }
        return ˊॱ().findViewById(i);
    }
}
